import pygame

class Explode(pygame.sprite.Sprite):
    def __init__(self,character):
        super().__init__()
        self.rect=character.rect
        self.step=0
        self.live = True
        self.images= [
            pygame.image.load('assets/boom1.png'),
            pygame.image.load('assets/boom2.png'),
            pygame.image.load('assets/boom3.png'),
            pygame.image.load('assets/boom4.png')
        ]
        self.image=self.images[self.step]

    def update(self, *args, **kwargs):
        self.step+=1
        if self.step>=4:self.live=False
        else :self.image = self.images[self.step]
